﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FretBoard
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            button1_Click(null, null);
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Guitar guitar = new Guitar();
            string1.Text = guitar.strings[0].returnNotes();
            string2.Text = guitar.strings[1].returnNotes();
            string3.Text = guitar.strings[2].returnNotes();
            string4.Text = guitar.strings[3].returnNotes();
            string5.Text = guitar.strings[4].returnNotes();
            string6.Text = guitar.strings[5].returnNotes();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                Guitar guitar = new Guitar();
                frets1.Text = guitar.strings[0].getNotePositions(noteSelector.Text);
                frets2.Text = guitar.strings[1].getNotePositions(noteSelector.Text);
                frets3.Text = guitar.strings[2].getNotePositions(noteSelector.Text);
                frets4.Text = guitar.strings[3].getNotePositions(noteSelector.Text);
                frets5.Text = guitar.strings[4].getNotePositions(noteSelector.Text);
                frets6.Text = guitar.strings[5].getNotePositions(noteSelector.Text);
            }
            catch
            {
                MessageBox.Show("Bad Input Try Again.");
            }
            }

        private void button3_Click(object sender, EventArgs e)
        {
            Scale scale = new Scale(scaleNote.Text);
            majorText.Text = scale.getScale("Major", new StringBuilder());
            minorText.Text = scale.getScale("Minor", new StringBuilder());

        }

        private void label13_Click(object sender, EventArgs e)
        {

        }





    }
}
